package com.oig.sys.workflow.controller;

import com.oig.sys.workflow.service.ITbDataModuleDetailService;
import com.oig.sys.workflow.vo.DataModuleDetailVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "实体对象列")
@RestController
@RequestMapping("/dataModuleCol")
@Slf4j
@RequiredArgsConstructor
public class TbDataModuleDetailController {


    private final ITbDataModuleDetailService dataModuleDetailService;


    @Operation(summary = "查看实体对象列列表,提供备选")
    @PostMapping("/listByModuleId")
    public List<DataModuleDetailVo> findAllByModuleId(Integer moduleId){
        log.info("find data module col by module id={}", moduleId);
        return this.dataModuleDetailService.findAllByModuleId(moduleId);
    }


}
